<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="页面头部">
<meta name="author" content="xwj">
<title>top</title>

<script>
function logout(){
	
	if(confirm("确认要退出吗?")){

		$.ajax({
			url : "adminMsg/Logout.do", // 请求地址
			type : "POST", // 请求类型
			async : "true", // 是否异步方式
			data : {},
			dataType : "json", // 返回数据格式
			success : function(data, textStatus) {
				if (data.res == 1) {
					alert("退出成功！");
					window.location.replace("admin/login.jsp");
					}else{
						alert("退出失败！");
					}
			}
		});
	}
}
function detail(bookId){
	window.location.href="admin/book_edit.jsp?id="+bookId;
}
</script>
</head>
<body>
<!--header start-->
		<header class="header black-bg">
			<div class="sidebar-toggle-box">
				<div class="fa fa-bars tooltips" data-placement="right"
					data-original-title="隐藏或显示菜单"></div>
			</div>
			<!--logo start-->
			<a href="index.jsp" class="logo"><b>天天书城管理</b></a>
			<!--logo end-->

			<div class="top-menu">
				<ul class="nav pull-right top-menu">
					<li><button class="logout btn btn-default" onclick="logout()" >退出</button></li>
		
				</ul>

			</div>

		</header>
		<!--header end-->
</body>
</html>